<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="../bootstrap/font-awesome/css/font-awesome.css" rel="stylesheet">

    <link href="../bootstrap/css/animate.css" rel="stylesheet">
    <link href="../bootstrap/css/style.css" rel="stylesheet">
</head>
<body style="background: white; ">
    <div class="middle-box text-center loginscreen animated fadeInDown">
        <div>
            <div>
                <!--<h1 class="logo-name">IN+</h1>-->
            </div>
            <p>友和商城
                <!--Continually expanded and constantly improved Inspinia Admin Them (IN+)-->
            </p>
            <form id="myForm" class="m-t" role="form"  method="post">
                <div class="form-group">
                    <input type="userAccount" name="userAccount" id="userAccount" class="form-control" placeholder="用户名" required="">
                </div>
                <div class="form-group">
                    <input type="userPassword"  name="userPassword" id="userPassword" class="form-control" placeholder="密码" required="">
                </div>
                <button type="" class="btn btn-primary block full-width m-b">登录</button>

                <!--<a href="#">
                    <small>忘记密码？</small>
                </a>
                <p class="text-muted text-center">
                    <small>还没有账号？</small>
                </p>
                <a class="btn btn-sm btn-white btn-block" href="register.html">创建一个账号</a>-->
            </form>
            <!--<p class="m-t">
                <small>技术支持：广州星记云典信息技术有限公司</small>
            </p>-->
        </div>
    </div>
    <!-- Mainly scripts -->
    <script src="../bootstrap/js/jquery-3.1.1.min.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
    <script>
        $('#myForm').submit(function (e) {
            var userAccount = $('#userAccount').val();
            var userPassword = $('#userPassword').val();
            $.ajax({
                type: 'POST',
                url: 'login',
                // async: false,
                data: {userAccount: userAccount, userPassword: userPassword},
                success: function (r) {
                    console.log(r);
                    if (r.Status === 0) {
                        parent.layer.closeAll();
                    }
                }
            });

        });
    </script>
</body>
</html>